﻿using YNTK.Common.Helper;
using YNTK.Common.Model;
using YNTK.SubDev.Entitys.Dto.ZyOaProCost;
using Mapster;
using System.Collections.Generic;

namespace YNTK.SubDev.Entitys.Mapper.ZyOaProCost
{
	public class Mapper : IRegister
	{
		public void Register(TypeAdapterConfig config)
		{
			config.ForType<ZyOaProCostCrInput, ZyOaProCostEntity>()
				.Map(dest => dest.Appendix, src => src.appendix.ToJson())
				;
			config.ForType<ZyOaProCostEntity, ZyOaProCostInfoOutput>()
				.Map(dest => dest.appendix, src => src.Appendix.ToObject<List<FileControlsModel>>())
				;
		}
	}
}